package com.sa.module.uif.pojo;

import static javax.persistence.GenerationType.IDENTITY;

import javax.persistence.Column;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.MappedSuperclass;

/**
 * 活动联系人情况
 * 描述某项活动参加人的情况，包括邀请人和申请参与人
 * @author huangxin
 *
 */
@MappedSuperclass
public class AbstractAContactDetail {

	private int id;
	private Activity activity;	//活动	
	private Contacts contacts;	//联系人
	private int status;	//状态：1：同意；2：拒绝；3：暂定;
	
	@Id 
	@GeneratedValue(strategy=IDENTITY)	    
	@Column(name="ID", unique=true, nullable=false)
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "AID", nullable = true)
	public Activity getActivity() {
		return activity;
	}
	public void setActivity(Activity activity) {
		this.activity = activity;
	}
	
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "CID", nullable = true)
	public Contacts getContacts() {
		return contacts;
	}
	public void setContacts(Contacts contacts) {
		this.contacts = contacts;
	}
	
	@Column(name="STATUS", nullable=true)
	public int getStatus() {
		return status;
	}
	public void setStatus(int status) {
		this.status = status;
	}
	
	public AbstractAContactDetail(int id, Activity activity, Contacts contacts,
			int status) {
		super();
		this.id = id;
		this.activity = activity;
		this.contacts = contacts;
		this.status = status;
	}
	public AbstractAContactDetail() {
		super();
		// TODO Auto-generated constructor stub
	}
	@Override
	public String toString() {
		return "AbstractAContactDetail [id=" + id + ", activity=" + activity
				+ ", contacts=" + contacts + ", status=" + status + "]";
	}
	
	
}
